package com.example.oppotest.controller;

import org.springframework.ui.ModelMap;

public class BaseController {

    public final static String SUCCESS = "success";
    public final static String MSG = "msg";
    public final static String DATA = "data";
    public final static String CODE = "code";

    public void sendSuccessMessage(ModelMap map, String message) {
        map.put(SUCCESS, true);
        map.put(MSG, message);
    }

    public void sendFailureMessage(ModelMap map, String message) {
        map.put(SUCCESS, false);
        map.put(MSG, message);
    }

}
